import {postLoginWxMin,postTestLoginWxMin} from '@/api/profile'
export default {
  // 命名空间
  namespaced: true,
  state: {
    userInfo:null
  },
  getters: {},
  mutations: {
    setUserInfo(state,payload){
      state.userInfo = payload
    }
  },
  actions: {
    async fetchWxLogin(store,params){
      // 正常接口
      // const res = await postLoginWxMin(params)
      // 测试
      const res = await postTestLoginWxMin(params)
      store.commit('setUserInfo',res.result)
    }
  },
};
